<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>角色列表</title>
</head>
<body class="list">
	<div class="bar">
		角色管理&nbsp;总记录数: ${pager.totalItems} (共${pager.totalPages}页)
	</div>
	<div class="body">
		<form id="listForm" action="${base}/admin/role/list" method="post">
			<div class="listBar">
				<input type="button" class="formButton" onclick="location.href='${base}/admin/role/create'" value="添加角色" hidefocus />
				&nbsp;&nbsp;
				<label>角色名称: </label>
				<input type="text" name="filter_LIKES_name" value="${RequestParameters["filter_LIKES_name"]!}" />
				<input type="button" id="searchButton" class="formButton" value="搜 索" hidefocus />
				&nbsp;&nbsp;
				<label>每页显示: </label>
				<select name="pager.pageSize" id="pageSize">
					<option value="10"<#if pager.pageSize == 10> selected</#if>>
						10
					</option>
					<option value="20"<#if pager.pageSize == 20> selected</#if>>
						20
					</option>
					<option value="50"<#if pager.pageSize == 50> selected</#if>>
						50
					</option>
					<option value="100"<#if pager.pageSize == 100> selected</#if>>
						100
					</option>
				</select>
			</div>
			<table id="listTable" class="listTable">
				<tr>
					<th class="check">
						<input type="checkbox" class="allCheck" />
					</th>
					<th>
						<a href="#" class="sort" name="name" hidefocus>角色名称</a>
					</th>
					<th>
						<a href="#" class="sort" name="isSystem" hidefocus>系统内置</a>
					</th>
					<th>
						<a href="#" class="sort" name="description" hidefocus>描述</a>
					</th>
					<th>
						<a href="#" class="sort" name="createDate" hidefocus>创建日期</a>
					</th>
					<th>
						<span>操作</span>
					</th>
				</tr>
				<#list pager.result as role>
					<tr>
						<td>
							<input type="checkbox"<#if role.isSystem> disabled title="系统内置权限不允许删除!"<#else> name="ids" value="${role.id}"</#if> />
						</td>
						<td>
							${role.name}
						</td>
						<td>
							<span class="${role.isSystem?string('true','false')}Icon">&nbsp;</span>
						</td>
						<td>
							${(role.description)!}
						</td>
						<td>
							<span title="${role.createDate?string("yyyy-MM-dd HH:mm:ss")}">
								${role.createDate}
							</span>
						</td>
						<td>
							<a href="${base}/admin/role/update/${role.id}" title="编辑">[编辑]</a>
						</td>
					</tr>
				</#list>
			</table>
			<#if (pager.result?size > 0)>
				<div class="pagerBar">
					<div class="delete">
						<input type="button" id="deleteButton" class="formButton" url="${base}/admin/role/delete/" value="删 除" disabled hidefocus />
					</div>
					<div class="pager">
						<#include "pager.ftl" />
					</div>
				<div>
			<#else>
				<div class="noRecord">没有找到任何记录!</div>
			</#if>
		</form>
	</div>
</body>
</html>